<ion-view view-title="订单详情" class="home-wrap order" ng-init="orderUser()">
    <ion-header-bar class="bar bar-header bar-stable">
        <button class="button back-button buttons button-clear header-item" ui-sref="tab.orderstate">
            <i class="icon ion-ios-arrow-back"></i>
        </button>
        <h1 class="title">订单详情</h1>
    </ion-header-bar>
    <ion-content class="userticket-detail">
        <div class="ticket-bg">
            <div class="ticketinfo-wrap">
                <!--disniland -->
                <div class="ticket-info" ng-if="order.project!='1'">
                    <i class="iconfont icon-loc greenC"></i>
                    <div class="ticket-info-area ">
                        <p class="clearfix">门票种类：<em ng-bind="ticketType(order.contacts[0].contact_type)"></em> x <em ng-bind="order.disneydetail.num"></em>   
                            <span class="fr f14" ng-show="order.status=='1'">待付款</span>
                            <span class="fr f14" ng-show="order.status=='2'">已取消</span>
                            <span class="fr f14" ng-show="order.status=='3'">出票中</span>
                            <span class="fr f14" ng-show="order.status=='4'">退款中</span>
                            <span class="fr f14" ng-show="order.status=='5'">已出票</span>
                            <span class="fr f14" ng-show="order.status=='6'">已完成</span>
                            <span class="fr f14" ng-show="order.status=='7'">已退款</span>
                        </p>
                        <p>有效期：<em ng-bind="order.disneydetail.tour_time*1000|date:'yyyy/MM/dd'"></em><em ng-bind="' - ' + (order.disneydetail.tour_time*1000+24*3600*1000|date:'yyyy/MM/dd')" ng-show="order.contacts[0].contact_type=='4'||order.contacts[0].contact_type=='5'||order.contacts[0].contact_type=='6'"></em></p>
                        <p>取票人：<em ng-bind="order.contacts[0].contact_name"></em></p>
                        <p>联系方式：<em ng-bind="order.contacts[0].contact_mobile"></em></p>
                        <!-- <p>身份证：{{userDetail[0].contacts[0].identity_card}}</p> -->
                    </div>
                </div>
                <div class="ticket-info userticket-num" ng-if="order.project!='1'&&(order.status=='4'||order.status=='5'||order.status=='6'||order.status=='7')">
                    <i class="iconfont  icon-ticket2 greenC"></i>
                    <div class="ticket-info-area">
                        <p ng-repeat="ticket in order.contacts[0].tickets">取票号码 <em ng-bind="$index+1"></em>：<em ng-bind="ticket"></em></p>
                    </div>
                </div>
                <!--disniland end-->
                <!--ondeday info-->
                <div class="ticket-info" ng-if="order.project=='1'">
                    <i class="iconfont icon-loc greenC"></i>
                    <div class="ticket-info-area">
                        <p class="clearfix">联系人：<em ng-bind="order.onedaydetail.contact_person"></em>
                            <span class="fr f14" ng-show="order.status=='1'">待付款</span>
                            <span class="fr f14" ng-show="order.status=='2'">已取消</span>
                            <span class="fr f14" ng-show="order.status=='3'">已付款</span>
                            <span class="fr f14" ng-show="order.status=='4'">退款中</span>
                            <span class="fr f14" ng-show="order.status=='6'">已完成</span>
                        </p>
                        <p class="clearfix">联系人电话：<em ng-bind="order.onedaydetail.contact_num"></em></p>
                        <p>出行人：<span ng-repeat="person in order.contacts" ng-bind="person.contact_name" style="padding-right:5px;"></span></p>
                        <p>出行日期：<em ng-bind="order.onedaydetail.tour_time*1000|date:'yyyy-MM-dd'"></em></p>
                        <p ng-show="order.onedaydetail.need_english!='1'">*需要英文导游</p>
                    </div>
                </div>
                <!--ondey info end-->
            </div>
        </div>
        <!--.............................................................................................................-->
        <!--disniland-->
        <div class="order-row-wrap" ng-if="order.project!='1'" ui-sref="tab.ticket">
            <div class="label-wrap list" >
                <a class="item item-icon-left item-icon-right" style="padding:12px 54px;">
                    <i class="icon iconfont icon-note grayC"></i> 上海迪士尼度假区门票
                    <i class="icon iconfont icon-arrow-right f15"></i>
                </a>
            </div>
            <div class="order-img-wrap">
                <div class="order-img disline">
                    <img src="img/ticketlogo.jpg">
                </div>
                <div class="order-img-info disline">
                    中国大陆首座迪士尼度假区，一个特别为中国游客设计和打造的……
                </div>
                <!-- <div class="order-img-price disline">
                    ￥700
                </div> -->
            </div>
            <a class="item item-icon-left item-icon-right count-wrap">
                <!-- <p> -->
                    <!-- <span ng-if="userDetail[0].order_type==1">需付款</span> -->
                    <!-- <span ng-if="userDetail[0].order_type==2">出票中</span> -->
                    <!-- <span ng-if="userDetail[0].order_type==3">已出票</span> -->
                    <!-- <span>票已售完，退款中</span> -->
                <!-- </p> -->
                <p>合计:<span class="orange">￥<em ng-bind="order.order_price"></em></span></p>
            </a>
        </div>
        <!--disnilan end-->
        <!--.............................................................................................................-->
        <!--onday-->
        <div class="order-row-wrap" ng-if="order.project=='1'">
            <div class="label-wrap list" ui-sref="tab.onedaydetail({id:order.oneday[0].id})">
                <a class="item item-icon-left item-icon-right" style="padding:12px 54px;">
                    <i class="icon iconfont icon-note grayC"></i>  <em ng-bind="order.oneday[0].title"></em>
                    <i class="icon iconfont icon-arrow-right f15"></i>
                </a>
            </div>
            <div class="order-img-wrap clearfix">
                <div class="order-img disline">
                    <img ng-src="{{fullPath(order.oneday[0].banners[0])}}">
                </div>
                <div class="order-img-info disline">
                    <span ng-bind="order.oneday[0].description"></span>
                </div>
                <div class="order-img-price disline" style="text-align:right">
                    ￥ <em ng-bind="order.oneday[0].low_price|number:0"></em>起
                </div>
            </div>
            <div class="oneday-bg">
                <div class="oneday-userinfo">
                    <div class="oneday-userinfo-row clearfix">
                        <span class="text-left">成人 x <em ng-bind="order.contact_num_data.adult_num"></em>&nbsp;&nbsp;&nbsp;
                        <span class="orange">单价￥
                        <em ng-if="order.contact_num_data.adult_num==1" ng-bind="order.oneday[0].one_price"></em>
                        <em ng-if="order.contact_num_data.adult_num==2" ng-bind="order.oneday[0].two_price"></em>
                        <em ng-if="order.contact_num_data.adult_num==3" ng-bind="order.oneday[0].three_price"></em>
                        <em ng-if="order.contact_num_data.adult_num>=4" ng-bind="order.oneday[0].four_price"></em>
                        </span>
                        </span>
                        <span class="orange fr">￥
                        <em ng-if="order.contact_num_data.adult_num==1" ng-bind="order.oneday[0].one_price*1"></em>
                        <em ng-if="order.contact_num_data.adult_num==2" ng-bind="order.oneday[0].two_price*2"></em>
                        <em ng-if="order.contact_num_data.adult_num==3" ng-bind="order.oneday[0].three_price*3"></em>
                        <em ng-if="order.contact_num_data.adult_num>=4" ng-bind="order.oneday[0].four_price*order.contact_num_data.adult_num"></em>
                        </span>
                    </div>
                    <div class="oneday-userinfo-row clearfix" ng-show="order.contact_num_data.child_num>0">
                        <span class="text-left">1.2-1.4米儿童 x <em ng-bind="order.contact_num_data.child_num"></em>&nbsp;&nbsp;&nbsp;<span class="orange">单价￥
                        <em ng-if="order.contact_num_data.adult_num==1" ng-bind="order.oneday[0].one_price*.7"></em>
                        <em ng-if="order.contact_num_data.adult_num==2" ng-bind="order.oneday[0].two_price*.7"></em>
                        <em ng-if="order.contact_num_data.adult_num==3" ng-bind="order.oneday[0].three_price*.7"></em>
                        <em ng-if="order.contact_num_data.adult_num>=4" ng-bind="order.oneday[0].four_price*.7"></em>
                        </span></span>
                        <span class="orange fr">￥
                        <em ng-if="order.contact_num_data.adult_num==1" ng-bind="order.oneday[0].one_price*1*.7"></em>
                        <em ng-if="order.contact_num_data.adult_num==2" ng-bind="order.oneday[0].two_price*2*.7"></em>
                        <em ng-if="order.contact_num_data.adult_num==3" ng-bind="order.oneday[0].three_price*3*.7"></em>
                        <em ng-if="order.contact_num_data.adult_num>=4" ng-bind="order.oneday[0].four_price*order.contact_num_data.adult_num*.7"></em>
                        </span>
                    </div>
                    <div class="oneday-userinfo-row clearfix" ng-show="order.contact_num_data.childer_num>0">
                        <span class="text-left">1.2米以下儿童 x <em ng-bind="order.contact_num_data.childer_num"></em>&nbsp;&nbsp;&nbsp;<span class="orange">单价￥
                        <em ng-if="order.contact_num_data.adult_num==1" ng-bind="order.oneday[0].one_price*.85"></em>
                        <em ng-if="order.contact_num_data.adult_num==2" ng-bind="order.oneday[0].two_price*.85"></em>
                        <em ng-if="order.contact_num_data.adult_num==3" ng-bind="order.oneday[0].three_price*.85"></em>
                        <em ng-if="order.contact_num_data.adult_num>=4" ng-bind="order.oneday[0].four_price*.85"></em>
                        </span></span>
                        <span class="orange fr">￥
                        <em ng-if="order.contact_num_data.adult_num==1" ng-bind="order.oneday[0].one_price*.85"></em>
                        <em ng-if="order.contact_num_data.adult_num==2" ng-bind="order.oneday[0].two_price*.85"></em>
                        <em ng-if="order.contact_num_data.adult_num==3" ng-bind="order.oneday[0].three_price*.85"></em>
                        <em ng-if="order.contact_num_data.adult_num>=4" ng-bind="order.oneday[0].four_price*order.contact_num_data.adult_num*.85"></em>
                        </span>
                    </div>
                    <div class="oneday-userinfo-row clearfix" ng-show="order.onedaydetail.need_english=='2'">
                        <span class="text-left">英文导游</span>
                        <span class="orange fr">￥300</span>
                    </div>
                </div>
            </div>
            <a class="item item-icon-left item-icon-right count-wrap" style="padding:10px 15px;">
                <p>
                    <span ng-show="order.status=='1'">需付款</span>
                    <span ng-show="order.status!='1'&&order.status!='2'">已付款</span>
                </p>
                <p><span class="orange">￥<em ng-bind="order.order_price | number:2"></em></span></p>
            </a>
        </div>
        <!--oneday end-->
        <div class="order-num">
            <p>订单编号：<em ng-bind="order.id"></em></p>
            <p>创建时间：<em ng-bind="order.date_added*1000|date:'yyyy-MM-dd HH:mm'"></em></p>
            <!-- <p ng-if="order.status!='1'&&order.status!='2'">付款时间：2016-06-23 15:2</p> -->
        </div>
    </ion-content>
    <ion-footer-bar class="detail-footer-bar ticketuser-footer">
        <div style="width: 100%;font-size: 0;">
            <div style="display: inline-block;width:50%;">
                <button class="phone-sever">
                    <i class="iconfont icon-phone greenC f15"></i>
                    <span class="f14"><a href="tel:02163173206">联系客服</a></span>
                </button>
            </div>
            <div class="userticket-gopay" style="display: inline-block;width:50%;">
                <button class="f14 clickbtn" ng-click="cancelOrder(order)" ng-show="order.status=='1'">取消订单</button>
                <button class="f14 clickbtn" ng-click="deleteOrder(order)" ng-show="order.status=='2'||order.status=='6'||order.status=='7'">删除订单</button>
                <!-- <button class="f14 clickbtn" ng-click="cancelOrder(order)" ng-show="order.status=='3'">申请退款</button> -->
                <button class="f14 weui_btn weui_btn_primary" ng-click="pay(order)" ng-show="order.status=='1'">支付</button>
            </div>
        </div>
    </ion-footer-bar>
</ion-view>
